<template>
  <el-card >
    <div class="box">

      <img :src="userStore.avatar" class="avatar" />
      <h1 class="title">{{ getTime() }}好{{ userStore.username }}</h1>
    </div>
  </el-card>
</template>

<script setup lang="ts">
import useUserStore from '@/store/modules/user'
import { getTime } from '@/utils/time'
const userStore = useUserStore()

/* import { onMounted } from "vue";
import useUserStore from "@/store/modules/user";
const userStore = useUserStore()
onMounted(()=>{
  userStore.userInfo()
})
 */
</script>

<style scoped lang="scss">
.box {
  display: flex;
  justify-content: space-between;
  align-items:center;
  .avatar {
    width: 100px;
    height: 100px;
    border-radius: 100%;
  }
  .title{
    font-size: 20px;
    font-weight: bold;
  }
}
</style>
